#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;

class Solution{
    public:
    bool ans1(string cut, string ori){
        int cut_pl = 0, ori_pl = 0;
        int length = ori.size();
        while(length > ori_pl){
            if(ori[ori_pl] == cut[cut_pl]){
                cut_pl++;
            }
            ori_pl++;
        }
        if(cut_pl == cut.size()){
            return true;
        }
        return false;

    }

};

void test(){
    Solution s;
    string cut = "abc";
    string ori = "ahbgdc";
    bool ret = s.ans1(cut, ori);
    cout << ret << endl;
}

int main(void){
    test();

    return 0;
}